//
//  VSFindLifeViewController.m
//  UI项目2.0
//
//  Created by dlios on 15/7/15.
//  Copyright (c) 2015年 星际科技. All rights reserved.
//

#import "VSFindLifeViewController.h"
#import "VSFindClothesWaterLayout.h"
@interface VSFindLifeViewController () <UICollectionViewDataSource,UICollectionViewDelegate, VSFindWaterLayoutDelegate>
@property (nonatomic, retain) UICollectionView *collectionView;
@end

@implementation VSFindLifeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor orangeColor];
    
    VSFindClothesWaterLayout *asfd= [[VSFindClothesWaterLayout alloc]init];
    self.collectionView = [[[UICollectionView alloc]initWithFrame:self.view.bounds collectionViewLayout:asfd] autorelease];
    self.collectionView.delegate = self;
    self.collectionView.dataSource = self;
    [self.view addSubview:self.collectionView];
    self.collectionView.backgroundColor = [UIColor whiteColor];
    [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
    
}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 50;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
    cell.backgroundColor = [UIColor colorWithRed:arc4random() % 256 / 255.0 green:arc4random() % 256 / 255.0 blue:arc4random() % 256 / 255.0 alpha:1];
    return cell;
}


- (CGFloat)getLayoutHeight
{
    return 10000;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
